<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/css_style.css" rel="stylesheet">
    <link href="css/css_register.css" rel="stylesheet">
    <title>登录</title>
</head>
<body>
<div class="container">
    <div class="row">
        <div class="login col-md-5 col-md-offset-3 col-sm-8 col-sm-offset-2  col-xs-10 col-xs-offset-1 ">
            <h3>Login In</h3><hr/>

                <form class="form-inline" role="form" action="Register">
                    <label style="text-align: right">UserName</label>
                    <div class="input-group">
                        <span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
                        <input type="text" class="form-control" id="name" name="name" placeholder="username">
                    </div>

                    <label style="text-align: right">Email  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
                    <div class="input-group">
                        <span class="input-group-addon">@</span>
                        <input type="email" class="form-control" name="email" id="email"  placeholder="email">
                    </div><br/>

                    <label style="text-align: right">Password</label>
                    <div class="input-group">
                        <span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
                        <input type="password" id="password" class="form-control" name="password" placeholder="password">
                    </div><br/>

                    <label style="text-align: right">ConfirmPassword</label>
                    <div class="input-group">
                        <span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
                        <input type="password" class="form-control" id="confirmPassword" name="confirmPassword" placeholder="confirmPassword">
                    </div><br/>

                    <div class="tip">${tip}</div><br/>

                    <button class="btn btn-primary" onclick="return RegSubmit()">注册</button>
                </form>
        </div>
    </div>
</div>
</body>
</html>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>

<script>
    function RegSubmit() {
        var name = document.getElementById('name').value;
        var password = document.getElementById('password').value;
        var email = document.getElementById('email').value;
        var confirmPassword =  document.getElementById('confirmPassword').value;
        if(name == "" || password == "" || email == "")
        {
            alert('用户名或密码必填！');
            return false;
        }
        if(password != confirmPassword)
        {
            alert('两次密码必须相同');
            return false;
        }
        return true;
    }
</script>